package com.jh.paymentchannel.repository;

import com.jh.paymentchannel.pojo.XJYCoinRegister;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;


@Repository
public interface XJYCoinRepository extends JpaRepository<XJYCoinRegister, String>, JpaSpecificationExecutor<XJYCoinRegister>{
	
	@Query("select xjycoin from  XJYCoinRegister xjycoin where xjycoin.bankCard=:bankCard")
	public XJYCoinRegister	getXJYCoinRegisterByBankCard(@Param("bankCard") String bankCard);
	
	@Query("select xjycoin from  XJYCoinRegister xjycoin where xjycoin.bankCard=:bankCard and xjycoin.phone=:phone")
	public XJYCoinRegister	getXJYCoinRegisterByPhoneAndBankCard(@Param("bankCard") String bankCard, @Param("phone") String phone);
	
}
